import request from '@/utils/request'
/**
 * 用户登录
 * @param {*} obj 手机号和密码
 * @returns
 */
export const reqLogin = (obj) => {
  return request({
    method: 'post',
    url: 'http://localhost:8888/api/sys/login',
    data: obj
  })
}

/**
 * 获取用户的个人资料
 * @param {*} token 传入token
 * @returns
 */
export const reqGetUserInfo = (token) => {
  return request({
    method: 'post',
    url: '/sys/profile'
  })
}

/**
 * 获取用户头像
 * @param {*} id 用户Id
 * @returns
 */
export const reqGetUserInfoPhoto = (id) => {
  return request({
    method: 'get',
    url: `/sys/user/${id}`
  })
}
